Make local code upload size limit configurable#2673
Merged
r4victor merged 1 commit intodstackai:masterfrom May 21, 2025
Merged
Conversation
dakota-shop
reviewed
May 20, 2025
| USER_PROJECT_DEFAULT_QUOTA = int(os.getenv("DSTACK_USER_PROJECT_DEFAULT_QUOTA", 10)) | ||
| FORBID_SERVICES_WITHOUT_GATEWAY = os.getenv("DSTACK_FORBID_SERVICES_WITHOUT_GATEWAY") is not None | ||
|
|
||
| SERVER_CODE_UPLOAD_LIMIT = int(os.getenv("DSTACK_SERVER_CODE_UPLOAD_LIMIT", 2 * 2**20)) |
There was a problem hiding this comment.
Would it be easy to implement this as a friendly string like 2M or 1G?
Collaborator
There was a problem hiding this comment.
LGTM, so merging it now. Feel free to open a new PR if parsing human-readable strings is needed.
Collaborator
There was a problem hiding this comment.
@dakota-shop, other environment variables like DSTACK_DEFAULT_SERVICE_CLIENT_MAX_BODY_SIZE do not support human-readable strings as well, so probably makes sense to add the parsing to all of them if at all.
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2663
Adds an env variable which can be used to configure the max code upload size, or disable it. Also improves error message when hitting limit by including size of diff.